//
//  SgyPhotoScrollView.m
//  SGYPhotoPicker
//
//  Created by ShiMac on 15/7/5.
//  Copyright © 2015年 guoyan. All rights reserved.
//

#import "SgyPhotoScrollView.h"
#import "SgyPhotoItemView.h"

@implementation SgyPhotoScrollView


-(void)layoutSubviews{
    
    [super layoutSubviews];
    
    CGFloat width=[[UIScreen mainScreen] bounds].size.width;
    CGFloat height=[[UIScreen mainScreen] bounds].size.height;
    
    [self.subviews enumerateObjectsUsingBlock:^( UIView *  obj, NSUInteger idx, BOOL * __nonnull stop) {
        
        
        if ([obj isKindOfClass:[SgyPhotoItemView class]]) {
            
            SgyPhotoItemView *itemView=(SgyPhotoItemView *)obj;
            
            
            [itemView setFrame:CGRectMake(itemView.photoindex*(width), 0, width, height)];
            
            
        }
        
    }];
    
    
    
    
    
    
    
    
    
}

@end
